﻿<?xml version="1.0" encoding="utf-8"?>
<xs:schema id="WSIMCompatibility" targetNamespace="http://tempuri.org/WSIMCompatibility.xsd" xmlns:mstns="http://tempuri.org/WSIMCompatibility.xsd" xmlns="http://tempuri.org/WSIMCompatibility.xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" xmlns:msprop="urn:schemas-microsoft-com:xml-msprop" attributeFormDefault="qualified" elementFormDefault="qualified">
  <xs:annotation>
    <xs:appinfo source="urn:schemas-microsoft-com:xml-msdatasource">
      <DataSource DefaultConnectionIndex="0" FunctionsComponentName="QueriesTableAdapter" Modifier="AutoLayout, AnsiClass, Class, Public" SchemaSerializationMode="IncludeSchema" xmlns="urn:schemas-microsoft-com:xml-msdatasource">
        <Connections>
          <Connection AppSettingsObjectName="Web.config" AppSettingsPropertyName="wsimConnectionString" ConnectionStringObject="" IsAppSettingsProperty="true" Modifier="Assembly" Name="wsimConnectionString (Web.config)" ParameterPrefix="@" PropertyReference="AppConfig.System.Configuration.ConfigurationManager.0.ConnectionStrings.wsimConnectionString.ConnectionString" Provider="MySql.Data.MySqlClient" />
        </Connections>
        <Tables>
          <TableAdapter BaseClass="System.ComponentModel.Component" DataAccessorModifier="AutoLayout, AnsiClass, Class, Public" DataAccessorName="CompatibilityMessageModelTableAdapter" GeneratorDataComponentClassName="CompatibilityMessageModelTableAdapter" Name="CompatibilityMessageModel" UserDataComponentName="CompatibilityMessageModelTableAdapter">
            <MainSource>
              <DbSource ConnectionRef="wsimConnectionString (Web.config)" DbObjectType="Unknown" GenerateMethods="Get" GenerateShortCommands="false" GeneratorGetMethodName="GetDataByRequest" GetMethodModifier="Public" GetMethodName="GetDataByRequest" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="false" UserGetMethodName="GetDataByRequest" UserSourceName="GetDataByRequest">
                <SelectCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="true">
                    <CommandText>SELECT        wsim_message_model.ID, wsim_message_model.TEXT AS Text, wsim_message_model.MSG_DATETIME AS Data, 'True' AS New, 
                         wsim_user_1.USERNAME AS UFrom, wsim_user.USERNAME AS UTo
FROM            wsim_message_model INNER JOIN
                         wsim_user wsim_user_1 ON wsim_message_model.USER_SENDER = wsim_user_1.USER_ID INNER JOIN
                         wsim_user ON wsim_message_model.USER_RECEIVER = wsim_user.USER_ID
WHERE        (wsim_user_1.USERNAME = @UFrom) AND (wsim_user.USERNAME = @UTo) AND (wsim_message_model.IS_NOT_READ = 1)</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="false" AutogeneratedName="UFrom" ColumnName="USERNAME" DataSourceName="wsim.wsim_user" DataTypeServer="varchar(50)(50)" DbType="String" Direction="Input" ParameterName="@UFrom" Precision="0" ProviderType="VarChar" Scale="0" Size="50" SourceColumn="UFrom" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="false" AutogeneratedName="UTo" ColumnName="USERNAME" DataSourceName="wsim.wsim_user" DataTypeServer="varchar(50)(50)" DbType="String" Direction="Input" ParameterName="@UTo" Precision="0" ProviderType="VarChar" Scale="0" Size="50" SourceColumn="UTo" SourceColumnNullMapping="false" SourceVersion="Current" />
                    </Parameters>
                  </DbCommand>
                </SelectCommand>
              </DbSource>
            </MainSource>
            <Mappings>
              <Mapping SourceColumn="ID" DataSetColumn="ID" />
              <Mapping SourceColumn="Text" DataSetColumn="Text" />
              <Mapping SourceColumn="Data" DataSetColumn="Data" />
              <Mapping SourceColumn="New" DataSetColumn="New" />
              <Mapping SourceColumn="UFrom" DataSetColumn="UFrom" />
              <Mapping SourceColumn="UTo" DataSetColumn="UTo" />
            </Mappings>
            <Sources />
          </TableAdapter>
        </Tables>
        <Sources />
      </DataSource>
    </xs:appinfo>
  </xs:annotation>
  <xs:element name="WSIMCompatibility" msdata:IsDataSet="true" msdata:UseCurrentLocale="true" msprop:Generator_DataSetName="WSIMCompatibility" msprop:Generator_UserDSName="WSIMCompatibility" msprop:EnableTableAdapterManager="true">
    <xs:complexType>
      <xs:choice minOccurs="0" maxOccurs="unbounded">
        <xs:element name="CompatibilityMessageModel" msprop:Generator_UserTableName="CompatibilityMessageModel" msprop:Generator_RowDeletedName="CompatibilityMessageModelRowDeleted" msprop:Generator_TableClassName="CompatibilityMessageModelDataTable" msprop:Generator_RowChangedName="CompatibilityMessageModelRowChanged" msprop:Generator_RowClassName="CompatibilityMessageModelRow" msprop:Generator_RowChangingName="CompatibilityMessageModelRowChanging" msprop:Generator_RowEvArgName="CompatibilityMessageModelRowChangeEvent" msprop:Generator_RowEvHandlerName="CompatibilityMessageModelRowChangeEventHandler" msprop:Generator_TablePropName="CompatibilityMessageModel" msprop:Generator_TableVarName="tableCompatibilityMessageModel" msprop:Generator_RowDeletingName="CompatibilityMessageModelRowDeleting">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="ID" msprop:Generator_UserColumnName="ID" msprop:Generator_ColumnPropNameInRow="ID" msprop:Generator_ColumnVarNameInTable="columnID" msprop:Generator_ColumnPropNameInTable="IDColumn" type="xs:long" />
              <xs:element name="Text" msprop:Generator_UserColumnName="Text" msprop:Generator_ColumnPropNameInRow="Text" msprop:Generator_ColumnVarNameInTable="columnText" msprop:Generator_ColumnPropNameInTable="TextColumn" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="1000" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="Data" msprop:Generator_UserColumnName="Data" msprop:Generator_ColumnPropNameInRow="Data" msprop:Generator_ColumnVarNameInTable="columnData" msprop:Generator_ColumnPropNameInTable="DataColumn" type="xs:dateTime" minOccurs="0" />
              <xs:element name="New" msprop:Generator_UserColumnName="New" msprop:Generator_ColumnPropNameInRow="New" msprop:Generator_ColumnVarNameInTable="columnNew" msprop:Generator_ColumnPropNameInTable="NewColumn">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="4" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="UFrom" msprop:Generator_UserColumnName="UFrom" msprop:Generator_ColumnPropNameInRow="UFrom" msprop:Generator_ColumnVarNameInTable="columnUFrom" msprop:Generator_ColumnPropNameInTable="UFromColumn">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="50" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="UTo" msprop:Generator_UserColumnName="UTo" msprop:Generator_ColumnPropNameInRow="UTo" msprop:Generator_ColumnVarNameInTable="columnUTo" msprop:Generator_ColumnPropNameInTable="UToColumn">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="50" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
            </xs:sequence>
          </xs:complexType>
        </xs:element>
      </xs:choice>
    </xs:complexType>
    <xs:unique name="Constraint1" msdata:PrimaryKey="true">
      <xs:selector xpath=".//mstns:CompatibilityMessageModel" />
      <xs:field xpath="mstns:ID" />
    </xs:unique>
  </xs:element>
</xs:schema>